// pages/Home/schoolRowde/schoolRowde.js
var businessLogic = require('../../../utils/NetWork/Model/HomebusinessLogic.js')
var WxParse = require('../../../utils/Component/wxParse/wxParse.js');
var common = require('../../../utils/common.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    post_title:[],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var orgid = common.getStorageSync("orgid")
    var userid = common.getStorageSync("userid")
    this.setData({
      orgid: orgid,
      userid: userid
    });
    var ryid = options.id;
    // console.log(ryid);
    this.rytemp(ryid);
  }, rytemp: function (ryid){
    let params = { "orgid": this.data.orgid, "userid": this.data.userid, "id": ryid };
    //第三步 调用接口
    businessLogic.SchoolHonoraryTempxue(params, (res) => {
      // console.log(res);
      //第五步 把获取的值，传入data
      this.setData({
        post_title: res
      });
      var article = res.content;
      var that = this;
      WxParse.wxParse('article', 'html', article, that, 20);
    });

  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})